package com.zqx.pojo;

import java.math.BigDecimal;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Laoxue entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "LAOXUE", schema = "AJWXJK")
@org.hibernate.annotations.Entity(dynamicInsert=true)
@SequenceGenerator(name="SEQ", sequenceName="TEST_SEQ",allocationSize=1)
public class Laoxue implements java.io.Serializable {

	// Fields

	private long lxid;
	private Stu stu;
	private Laoshi laoshi;
	private String zt;




	// Property accessors
	@Id
	@Column(name = "LXID", unique = true, nullable = false, precision = 22, scale = 0)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ")
	public long getLxid() {
		return this.lxid;
	}

	
	public void setLxid(long lxid) {
		this.lxid = lxid;
	}


	
	@ManyToOne(fetch=FetchType.LAZY,cascade = CascadeType.ALL)
	@JoinColumns({
		@JoinColumn(name="SPH",referencedColumnName="SPH"),
		@JoinColumn(name="SID",referencedColumnName="STUID")
	}
		)
	
	public Stu getStu() {
		return stu;
	}



	public void setStu(Stu stu) {
		this.stu = stu;
	}



	@ManyToOne(fetch=FetchType.LAZY,cascade = CascadeType.ALL)
	@JoinColumn(name="LID")
	public Laoshi getLaoshi() {
		return laoshi;
	}



	public void setLaoshi(Laoshi laoshi) {
		this.laoshi = laoshi;
	}



	@Column(name = "ZT", length = 1)
	public String getZt() {
		return this.zt;
	}

	public void setZt(String zt) {
		this.zt = zt;
	}

}